﻿.table-container {
    position: relative;
    --bb-table-td-padding-x: .5rem;
    --bb-table-td-padding-y: .5rem;
    --bb-table-cardview-label-width: 30%;
    --bb-table-header-hover-bg: #e9ecef;
    --bb-table-header-icon-color: #ddd;
    --bb-table-header-icon-active-color: #409eff;
    --bb-table-header-icon-hover-bg: #ddd;
    --bb-table-header-icon-hover-color: #606266;
    --bb-table-header-min-height: 37px;
    --bb-table-footer-font-weight: blod;
    --bb-table-footer-border-top: 2px solid #dee2e6;
    --bb-table-card-row-padding: .75rem .5rem;
    --bb-table-columnlist-max-height: var(--bb-dropdown-max-height);
    --bs-table-striped-bg: rgba(0,0,0,.05);
    --bs-table-hover-bg: rgba(0,0,0,.075);
    --bb-table-search-body-margin: 1rem;
    --bb-table-copy-column-margin-right: .5rem;
    --bb-table-column-fixed-border-color: #dee2e6;
    --bb-loader-bg: #f8f9fa;
}

    .table-container .table:not(.table-excel) .switch {
        --bb-switch-padding: 0;
    }

    .table-container > :not(:first-child):not(.table-loader):not(.table-wrapper):not(.table-filter),
    .table-container > :not(.table-toolbar) + .table-wrapper {
        margin-top: .5rem;
    }

    .table-container .table > :not(caption) > * > * {
        padding: var(--bb-table-td-padding-y) var(--bb-table-td-padding-x);
    }

.table-excel {
    --bb-border-hover-color: transparent;
    --bb-border-focus-color: transparent;
}

.table-dark {
    --bb-table-header-hover-bg: #343a40;
    --bb-table-header-icon-hover-bg: #6c757d;
    --bb-table-header-icon-hover-color: #495057;
}

.table-light {
    --bb-table-header-icon-color: #c0c4cc;
    --bb-table-header-icon-hover-color: #495057;
}

.table-sm {
    --bb-table-td-padding-x: .25rem;
    --bb-table-td-padding-y: .25rem;
}

.filter-header th {
    --bb-table-td-padding-x: 0;
    --bb-table-td-padding-y: 0;
}

    .filter-header th:hover {
        --bb-table-header-hover-bg: transparent;
    }

.table-wrapper {
    border-radius: var(--bs-border-radius);
    border: 1px solid var(--bs-border-color);
}

    .table-wrapper thead tr:first-child {
        border-top: none;
    }

    .table-wrapper tbody tr:last-child {
        border-bottom: none;
    }

    .table-wrapper th:first-child,
    .table-wrapper td:first-child,
    .table-wrapper th.fixed-scroll {
        border-left-width: 0;
    }

    .table-wrapper th:last-child,
    .table-wrapper td:last-child,
    .table-wrapper .table-fixed-header th:nth-last-of-type(2) {
        border-right-width: 0;
    }

    .table-wrapper tr:last-child td {
        border-bottom-width: 0;
    }

    .table-wrapper .table-fixed-body td:last-child {
        border-right-width: 1px;
    }

.table {
    margin-bottom: 0;
}

    .table thead th, .table tbody td {
        border-top: none;
    }

    .table thead th {
        white-space: nowrap;
        vertical-align: top;
    }

        .table thead th.sortable .table-text {
            cursor: pointer;
        }

        .table thead th.sortable .table-text,
        .table thead th.filterable .table-text {
            padding-right: 1rem;
        }

        .table thead th.sortable:hover,
        .table thead th.filterable:hover {
            background-color: var(--bb-table-header-hover-bg);
        }

        .table thead th .table-cell {
            position: relative;
        }

        .table thead th .table-text {
            flex: 1;
        }

        .table thead th .filter-icon,
        .table thead th .sort-icon {
            position: absolute;
            right: calc(0px - var(--bb-table-td-padding-x));
            top: calc(0px - var(--bb-table-td-padding-y));
            bottom: calc(0px - var(--bb-table-td-padding-y));
        }

            .table thead th .filter-icon > i,
            .table thead th .sort-icon {
                width: 1.5rem;
                display: flex;
                align-items: center;
                justify-content: center;
                color: var(--bb-table-header-icon-color);
                cursor: pointer;
            }

            .table thead th .filter-icon > i {
                height: 100%;
            }

                .table thead th .filter-icon > i:hover,
                .table thead th .sort-icon:hover {
                    background-color: var(--bb-table-header-icon-hover-bg);
                    color: var(--bb-table-header-icon-hover-color);
                }

                .table thead th .filter-icon > i.active {
                    color: var(--bb-table-header-icon-active-color);
                }

        .table thead th.sortable.filterable .filter-icon {
            right: calc(1.5rem - var(--bb-table-td-padding-x));
        }

        .table thead th.sortable.filterable .table-text {
            padding-right: 2.5rem;
            overflow: hidden;
            text-overflow: ellipsis;
        }

    .table tfoot {
        font-weight: var(--bb-table-footer-font-weight);
        border-top: var(--bb-table-footer-border-top);
    }

    .table td, .table th {
        min-width: 0;
        text-overflow: ellipsis;
    }

    .table .is-editform .table-cell {
        overflow: hidden;
    }

.is-clickable tbody tr,
.is-clickable .table-row {
    cursor: pointer;
}

.table-cell {
    display: flex;
    align-items: center;
    word-break: break-all;
}

    .table-cell.center {
        justify-content: center;
    }

        .table-cell.center > * {
            text-align: center;
        }

        .table-cell.center > .switch {
            justify-content: center;
        }

    .table-cell.end {
        justify-content: right;
    }

        .table-cell.end > * {
            text-align: right;
        }

        .table-cell.end > .switch {
            justify-content: flex-end;
        }

    .table-cell .btn-group .btn {
        white-space: nowrap;
    }

    .table-cell > .form-control,
    .table-cell > .select,
    .table-cell > .datetime-picker {
        --bs-border-color: transparent;
    }

    .table-cell > .is-display {
        --bs-border-color: var(--bb-disabled-bg);
        --bb-border-hover-color: var(--bb-disabled-bg);
        --bb-border-focus-color: var(--bb-disabled-bg);
    }

.table-hover tbody tr.is-detail:hover,
.table-hover tbody tr.is-editform,
.table-hover tbody tr.is-editform:hover {
    --bs-table-accent-bg: unset;
}

.table tbody tr.is-master td:first-child {
    padding-left: 0;
    padding-right: 0;
}

.table-toolbar:after {
    content: "";
    display: block;
    clear: both;
}

.table-toolbar .table-toolbar-button {
    margin-bottom: .5rem;
}

.table-toolbar .dropdown-menu {
    max-height: var(--bb-table-columnlist-max-height);
}

    .table-toolbar .dropdown-menu .dropdown-item span {
        margin-left: .5rem;
    }

.table-toolbar .form-check.is-label {
    display: flex;
}

.btn-gear .dropdown-menu {
    min-width: initial;
    padding: 0;
}

    .btn-gear .dropdown-menu .dropdown-item {
        padding: 6px 12px;
        display: table-cell;
        color: #504d4d;
    }

        .btn-gear .dropdown-menu .dropdown-item:not(:first-child) {
            border-left: solid 1px #aeb2b7;
        }

.table-column-right {
    margin-left: 0.3125rem;
}

.search-input-tooltip {
    font-size: 0.75rem;
}

    .search-input-tooltip kbd {
        display: inline-block;
        background: #17a2b8;
        padding: 1px 6px;
    }

.table-layout-fixed {
    table-layout: fixed;
}

.table-fixed {
    height: 100%;
}

.table-fixed-header {
    overflow: hidden;
    border-top-left-radius: var(--bs-border-radius);
    border-top-right-radius: var(--bs-border-radius);
}

.table-fixed-body {
    overflow-x: auto !important;
    overflow-y: scroll !important;
}

.table-scroll {
    overflow: auto;
}

    .table-scroll .table tbody td .table-cell:not(.is-wrap) {
        white-space: nowrap;
    }

.table-cell.is-ellips {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

    .table-cell.is-ellips.is-resizable {
        position: absolute;
        left: 12px;
        right: 12px;
    }

.table-loading,
.table-loader,
.form-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: var(--bs-border-radius);
    padding: 2rem;
    flex: 1;
}

.table-loader,
.form-loader {
    display: none;
    opacity: 0.8;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background-color: var(--bb-loader-bg);
    z-index: 5;
}

    .table-loader.show,
    .form-loader.show {
        display: flex;
    }

.table tbody tr.active:not(.is-edit),
.table-row.active {
    background-color: var(--bs-table-active-bg);
}

.table-hover > tbody > tr.is-detail:hover,
.table-hover > tbody > tr.is-edit.active,
.table-excel > tbody > tr:hover {
    --bs-table-accent-bg: none;
}

.table-row {
    padding: var(--bb-table-card-row-padding);
}

    .table-row:not(:last-child) {
        border-bottom: 1px solid #dee2e6;
    }

    .table-row:first-child {
        border-top-left-radius: var(--bs-border-radius);
        border-top-right-radius: var(--bs-border-radius);
    }

    .table-row:last-child {
        border-bottom-left-radius: var(--bs-border-radius);
        border-bottom-right-radius: var(--bs-border-radius);
    }

    .table-row .table-cell:not(:last-child) {
        padding-bottom: 0.5rem;
    }

    .table-row .table-cell label:not(.form-check) {
        font-weight: bold;
        width: var(--bb-table-cardview-label-width);
        margin-bottom: 0;
        color: #212529;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        margin-right: 6px;
    }

    .table-row .table-cell > span {
        display: inherit;
    }

    .table-row.table-footer {
        display: flex;
    }

        .table-row.table-footer .table-cell {
            padding-bottom: 0;
        }

            .table-row.table-footer .table-cell:first-child {
                font-weight: bold;
                width: var(--bb-table-cardview-label-width);
                margin-bottom: 0;
                color: #212529;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }

.table-striped .table-row:nth-of-type(odd) {
    background-color: var(--bs-table-striped-bg);
}

.table-striped .table-row:hover {
    background-color: var(--bs-table-hover-bg);
}

.table-fixed-column .table {
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

    .table-fixed-column .table .fixed,
    .table-fixed-column .table .fixed-scroll {
        background-color: #fff;
    }

    .table-fixed-column .table th,
    .table-fixed-column .table td {
        border-left-width: 0;
        border-top-width: 0;
    }

    .table-fixed-column .table .table-light .fixed,
    .table-fixed-column .table .table-light .fixed-scroll,
    .table-fixed-column .table .table-dark .fixed,
    .table-fixed-column .table .table-dark .fixed-scroll {
        background-color: var(--bs-table-bg);
    }

    .table-fixed-column .table .fixed {
        position: sticky;
        z-index: 2;
    }

        .table-fixed-column .table .fixed.fr {
            border-right: 1px solid var(--bb-table-column-fixed-border-color);
        }

            .table-fixed-column .table .fixed.fr:after {
                box-shadow: inset 10px 0 8px -8px rgb(159 159 159 / 22%);
                position: absolute;
                top: 0;
                right: 0;
                bottom: 0;
                width: 30px;
                transform: translateX(100%);
                transition: box-shadow .3s;
                content: "";
                pointer-events: none;
            }

    .table-fixed-column .table .fixed-right {
        border-right: inherit;
    }

        .table-fixed-column .table .fixed-right.fl {
            border-left: 1px solid var(--bb-table-column-fixed-border-color);
        }

    .table-fixed-column .table .fixed.fl:after {
        box-shadow: inset -10px 0 8px -8px rgb(159 159 159 / 22%);
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        width: 30px;
        transform: translateX(-100%);
        transition: box-shadow .3s;
        content: "";
        pointer-events: none;
    }

.table-fixed-column .fixed-scroll {
    position: sticky;
    right: 0;
    background-color: var(--bs-table-bg);
}

.table .is-bar {
    padding: 0;
    justify-content: center;
}

    .table .is-bar .fa-caret-right {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        display: inline-flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        transition: background-color .3s linear, transform .3s linear;
    }

        .table .is-bar .fa-caret-right:hover {
            background-color: #ddd;
        }

.table .is-detail {
    display: none;
}

    .table .is-detail.show {
        display: table-row;
    }

.table .table-cell .table-container,
.table .table-cell .tabs,
.table .table-cell form {
    flex: 1;
}

.table-resize thead th,
.table-resize tbody td {
    position: relative;
}

    .table-resize thead th .col-resizer {
        width: .25rem;
        display: block;
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        cursor: col-resize;
    }

.table-resize .border-resize {
    border-right: 1px solid #409eff;
}

.table .table-cell.is-tree {
    cursor: pointer;
}

.table-cell.is-incell {
    margin: -7px -6px;
}

    .table-cell.is-incell .switch {
        padding: 7px 6px;
    }

    .table-cell.is-incell .select {
        width: 100%;
    }

.table-cell .is-node .is-tree {
    transition: transform .3s linear;
}

.table-sm .table-cell.is-incell {
    margin: -.25rem;
}

    .table-sm .table-cell.is-incell .form-control {
        height: calc(1.5em + .75rem -3px);
    }

    .table-sm .table-cell.is-incell .switch {
        height: 30px;
        padding-left: 4px;
    }

.table-bordered thead tr:last-child > th {
    border-bottom-width: 2px !important;
    border-bottom-color: var(--bs-secondary);
}

.table-striped > tbody > tr.is-master:nth-of-type(4n+1) {
    --bs-table-accent-bg: var(--bs-table-striped-bg);
    color: var(--bs-table-striped-color);
}

.table-wrapper .empty-text {
    padding: 1rem;
}

form .table .table-cell > .form-label {
    display: none;
}

form .table .table-cell > textarea {
    width: 100%;
}

.table-search .card-header {
    --bs-card-cap-padding-y: 0;
    min-height: var(--bb-table-header-min-height);
}

    .table-search .card-header .table-search-buttons .btn {
        padding: .275rem .5rem;
    }

    .table-search .card-header .input-group {
        width: auto;
    }

        .table-search .card-header .input-group .table-toolbar-search,
        .table-search .card-header .input-group .btn {
            height: calc(var(--bb-table-header-min-height) - 4px);
        }

    .table-search .card-header [aria-expanded="true"] + .input-group,
    .table-search .card-header [aria-expanded="false"] + .input-group + .table-search-buttons {
        display: none;
    }

.table-excel-toolbar {
    display: none;
    position: absolute;
}

.table-excel.table > :not(caption):not(thead) > * > * {
    padding: 0;
}

.table-excel.table > :not(caption):not(thead) > * > .table-column-button {
    padding: 6px 12px;
}

.table-excel > tbody .is-bar {
    padding: .5rem 0;
}

.table-excel > tbody > tr > td > .table-cell > .form-check {
    padding: 6px 8px;
}

.table-excel .active > td > .table-cell .form-control,
.table-excel .active > td > .table-cell .form-select {
    background-color: transparent;
}

.table-excel .table-cell .select {
    width: 100%;
}

.table-excel .table-cell > .disabled {
    background-color: var(--bb-disabled-bg);
    width: 100%;
    padding: .375rem .1875rem;
}

.table-excel .datetime-picker-input {
    padding-left: 2rem;
}

.table-excel .datetime-picker-input-icon {
    line-height: 32px;
}

.table-cell.text-center,
.table-cell.text-center .switch {
    justify-content: center;
}

    .table-cell.text-center input {
        text-align: center;
    }

.table-cell.text-end,
.table-cell.text-end .switch {
    justify-content: end;
}

    .table-cell.text-end input {
        text-align: right;
    }

.table-cell > .progress {
    flex: 1;
}

.table-cell.is-ph {
    height: 12.5px;
    background-color: #e9ecef;
    border-radius: var(--bs-border-radius);
    margin: 5px 0;
}

.table-cell .is-dbcell {
    display: flex;
    cursor: pointer;
    position: relative;
}

    .table-cell .is-dbcell:hover:before {
        content: "";
        position: absolute;
        bottom: -3px;
        height: 1px;
        width: 100%;
        background-color: var(--bs-primary);
    }

.table-cell .is-node {
    width: 18px;
}

.table-cell .tag {
    line-height: 22px;
}

.table-cell .is-color {
    width: 28px;
    height: 21px;
    border-radius: 0.25rem;
}

.form-footer {
    margin-top: .5rem;
}

.modal-body .form-footer {
    margin: 1rem -1rem 0 -1rem;
    padding: 1rem 1rem 0 1rem;
    border-top: 1px solid #dee2e6;
    text-align: right;
}

    .modal-body .form-footer button:not(:last-child) {
        margin-right: .25rem;
    }

.modal-dialog-table.modal-dialog-scrollable .modal-body {
    display: flex;
    flex-direction: column;
}

    .modal-dialog-table.modal-dialog-scrollable .modal-body > form {
        overflow: hidden;
        display: flex;
        flex-direction: column;
        flex: 1;
        margin: -1rem;
    }

    .modal-dialog-table.modal-dialog-scrollable .modal-body .form-body {
        overflow-y: auto;
        overflow-x: hidden;
        padding: 1rem;
    }

    .modal-dialog-table.modal-dialog-scrollable .modal-body .form-footer {
        margin: 0;
        padding: 1rem;
    }

.table-wrap thead th .table-cell .table-text {
    white-space: pre-wrap;
}

.table-page-info {
    display: flex;
    align-items: center;
}

    .table-page-info .select {
        width: 120px;
    }

.col-copy {
    cursor: pointer;
    margin-right: var(--bb-table-copy-column-margin-right);
}
